<template>
	<view class="box" v-for="(itme,index) in phone1 " :key="itme.id">
		<checkbox @click="onchange"></checkbox>
		<text class = "phone" > {{itme.name}}</text>
		<text @click="rm" class="rms">删除</text>
	</view>
	<view>{{num}}</view>
</template>

<script setup>
import { ref } from 'vue';
	const phone1 = ref([
		{id:"123",name:"小米",price:20},
		{id:"124",name:"苹果",price:50},
		{id:"122",name:"华为",price:10},
		{id:"121",name:"oppo",price:25},
	]);
	let mun = 0;
	function rm(index){
		phone1.value.splice(index,1);
	};
	function onchange(index){
		phone1.value.price
	};
	
</script>

<style lang = "scss" scoped>
	
	.rms{
		color:red;
	}
	
</style>
